<!DOCTYPE HTML>
<html lang="en" >
    <!-- Start book 我的电子书 -->
    <head>
        <!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>元素垂直居中的方法 | 我的电子书</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.9">
        <meta name="author" content="Melon">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-image-captions/image-captions.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../md/02css/Interview.html" />
    
    
    <link rel="prev" href="../../md/02css/01selector.html" />
    

        <!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
        
    <div class="book"
        data-level="2.2"
        data-chapter-title="元素垂直居中的方法"
        data-filepath="md/02css/element_center.md"
        data-basepath="../.."
        data-revision="Mon Jun 08 2020 19:44:34 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/01html/01label.html">
            
                
                    <a href="../../md/01html/01label.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        HTML标签
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="md/01html/boxmodel.html">
            
                
                    <a href="../../md/01html/boxmodel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="md/01html/nvmgitbook.html">
            
                
                    <a href="../../md/01html/nvmgitbook.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        nvm和gitbook
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/02css/index.html">
            
                
                    <a href="../../md/02css/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        css
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="md/02css/01selector.html">
            
                
                    <a href="../../md/02css/01selector.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        选择器
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.2" data-path="md/02css/element_center.html">
            
                
                    <a href="../../md/02css/element_center.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        元素垂直居中的方法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="md/02css/Interview.html">
            
                
                    <a href="../../md/02css/Interview.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        面试题
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="md/02css/displayvisibility.html">
            
                
                    <a href="../../md/02css/displayvisibility.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        元素的显示模式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="md/02css/float.html">
            
                
                    <a href="../../md/02css/float.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        浮动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="md/02css/media.html">
            
                
                    <a href="../../md/02css/media.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        media媒体查询
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="md/02css/position.html">
            
                
                    <a href="../../md/02css/position.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        定位
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="md/02css/textoverflow.html">
            
                
                    <a href="../../md/02css/textoverflow.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        文本溢出处理
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >我的电子书</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x5143;&#x7D20;&#x5782;&#x76F4;&#x5C45;&#x4E2D;&#x7684;&#x65B9;&#x6CD5;">&#x5143;&#x7D20;&#x5782;&#x76F4;&#x5C45;&#x4E2D;&#x7684;&#x65B9;&#x6CD5;</h1>
<h2 id="&#x77E5;&#x9053;&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x7684;&#x5BBD;&#x9AD8;">&#x77E5;&#x9053;&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x7684;&#x5BBD;&#x9AD8;</h2>
<h3 id="1&#xFF1A;absolute--margin">1&#xFF1A;absolute + margin</h3>
<pre><code class="lang-css"><span class="hljs-rule"><span class="hljs-attribute">position</span>:<span class="hljs-value"> absolute</span></span>;
<span class="hljs-rule"><span class="hljs-attribute">background</span>:<span class="hljs-value">yellow</span></span>;
<span class="hljs-rule"><span class="hljs-attribute">top</span>:<span class="hljs-value"> <span class="hljs-number">50%</span></span></span>;
<span class="hljs-rule"><span class="hljs-attribute">left</span>:<span class="hljs-value"><span class="hljs-number">50%</span></span></span>;
<span class="hljs-rule"><span class="hljs-attribute">margin-top</span>:<span class="hljs-value"> -&#x5143;&#x7D20;<span class="hljs-number">1</span>/<span class="hljs-number">2</span>&#x9AD8;&#x5EA6;px</span></span>;
<span class="hljs-rule"><span class="hljs-attribute">margin-left</span>:<span class="hljs-value"> -&#x5143;&#x7D20;<span class="hljs-number">1</span>/<span class="hljs-number">2</span>&#x5BBD;&#x5EA6;px</span></span>;
</code></pre>
<h3 id="2&#xFF1A;absolute--margin-auto">2&#xFF1A;absolute + margin auto</h3>
<pre><code class="lang-css"><span class="hljs-rule"><span class="hljs-attribute">position</span>:<span class="hljs-value"> absolute</span></span>;
<span class="hljs-rule"><span class="hljs-attribute">top</span>:<span class="hljs-value"> <span class="hljs-number">0px</span></span></span>;
<span class="hljs-rule"><span class="hljs-attribute">bottom</span>:<span class="hljs-value"><span class="hljs-number">0px</span></span></span>;
<span class="hljs-rule"><span class="hljs-attribute">left</span>:<span class="hljs-value"> <span class="hljs-number">0px</span></span></span>;
<span class="hljs-rule"><span class="hljs-attribute">right</span>:<span class="hljs-value"> <span class="hljs-number">0px</span></span></span>;
<span class="hljs-rule"><span class="hljs-attribute">margin</span>:<span class="hljs-value">auto</span></span>;
</code></pre>
<h4 id="&#x603B;&#x7ED3;&#xFF1A;&#x5F53;&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x77E5;&#x9053;&#x5BBD;&#x9AD8;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x8BBE;&#x7F6E;&#x5C45;&#x4E2D;&#x7684;&#x65B9;&#x5F0F;&#x6BD4;&#x8F83;&#x7B80;&#x5355;&#x5355;&#x4E00;&#x3002;&#x4E24;&#x79CD;&#x79CD;&#x65B9;&#x6CD5;&#x7684;&#x672C;&#x8D28;&#x662F;&#x4E00;&#x6837;&#x7684;&#xFF0C;&#x90FD;&#x662F;&#x5BF9;&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x8FDB;&#x884C;&#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;&#xFF0C;&#x5728;&#x5B9A;&#x4F4D;&#x5230;&#x4E0A;50&#xFF0C;&#x5DE6;50&#x540E;&#x518D;&#x62C9;&#x56DE;&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x7684;&#x4E00;&#x534A;&#x5BBD;&#x9AD8;&#x5B9E;&#x73B0;&#x771F;&#x6B63;&#x7684;&#x5C45;&#x4E2D;&#x3002;&#x4E24;&#x79CD;&#x65B9;&#x5F0F;&#x7684;&#x533A;&#x522B;&#x5C31;&#x5728;&#x4E8E;&#x62C9;&#x56DE;&#x5143;&#x7D20;&#x672C;&#x8EAB;&#x5BBD;&#x9AD8;&#x7684;&#x65B9;&#x5F0F;&#x4E0D;&#x540C;&#x3002;">&#x603B;&#x7ED3;&#xFF1A;&#x5F53;&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x77E5;&#x9053;&#x5BBD;&#x9AD8;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x8BBE;&#x7F6E;&#x5C45;&#x4E2D;&#x7684;&#x65B9;&#x5F0F;&#x6BD4;&#x8F83;&#x7B80;&#x5355;&#x5355;&#x4E00;&#x3002;&#x4E24;&#x79CD;&#x79CD;&#x65B9;&#x6CD5;&#x7684;&#x672C;&#x8D28;&#x662F;&#x4E00;&#x6837;&#x7684;&#xFF0C;&#x90FD;&#x662F;&#x5BF9;&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x8FDB;&#x884C;&#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;&#xFF0C;&#x5728;&#x5B9A;&#x4F4D;&#x5230;&#x4E0A;<code>50%</code>&#xFF0C;&#x5DE6;<code>50%</code>&#x540E;&#x518D;&#x62C9;&#x56DE;&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x7684;&#x4E00;&#x534A;&#x5BBD;&#x9AD8;&#x5B9E;&#x73B0;&#x771F;&#x6B63;&#x7684;&#x5C45;&#x4E2D;&#x3002;&#x4E24;&#x79CD;&#x65B9;&#x5F0F;&#x7684;&#x533A;&#x522B;&#x5C31;&#x5728;&#x4E8E;&#x62C9;&#x56DE;&#x5143;&#x7D20;&#x672C;&#x8EAB;&#x5BBD;&#x9AD8;&#x7684;&#x65B9;&#x5F0F;&#x4E0D;&#x540C;&#x3002;</h4>
<h2 id="&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x7684;&#x5BBD;&#x9AD8;&#x672A;&#x77E5;">&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x7684;&#x5BBD;&#x9AD8;&#x672A;&#x77E5;</h2>
<h3 id="1&#xFF1A;absolute--transform">1&#xFF1A;absolute + transform</h3>
<pre><code class="lang-css"><span class="hljs-rule"><span class="hljs-attribute">position</span>:<span class="hljs-value"> absolute</span></span>;
<span class="hljs-rule"><span class="hljs-attribute">top</span>:<span class="hljs-value"> <span class="hljs-number">50%</span></span></span>;
<span class="hljs-rule"><span class="hljs-attribute">left</span>:<span class="hljs-value"><span class="hljs-number">50%</span></span></span>;
<span class="hljs-rule"><span class="hljs-attribute">transform</span>:<span class="hljs-value"> <span class="hljs-function">translate</span>(-<span class="hljs-number">50%</span> , -<span class="hljs-number">50%</span>)</span></span>;
</code></pre>
<ul>
<li>&#x539F;&#x7406;&#xFF1A;&#x539F;&#x7406;&#x7C7B;&#x4F3C;&#x4E8E;&#x5DF2;&#x77E5;&#x5BBD;&#x9AD8;&#x7684;&#x5B9E;&#x73B0;&#x65B9;&#x5F0F;&#xFF0C;&#x53EA;&#x4E0D;&#x8FC7;&#x5F53;&#x524D;&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x5BBD;&#x9AD8;&#x672A;&#x77E5;&#xFF0C;&#x6240;&#x4EE5;&#x9700;&#x8981;&#x81EA;&#x52A8;&#x83B7;&#x53D6;&#x5F53;&#x524D;&#x5C45;&#x4E2D;&#x5143;&#x7D20;&#x7684;&#x5BBD;&#x9AD8;&#x3002;</li>
<li>translate&#x5C5E;&#x6027;&#x6B63;&#x597D;&#x5B9E;&#x73B0;&#x4E86;&#x8BE5;&#x529F;&#x80FD;&#x3002;</li>
<li>&#x4F18;&#x7F3A;&#x70B9;<ol>
<li>&#x4F18;&#x70B9;&#xFF1A;&#x81EA;&#x52A8;&#x8BA1;&#x7B97;&#x672C;&#x8EAB;&#x7684;&#x5BBD;&#x9AD8;</li>
<li>&#x7F3A;&#x70B9;&#xFF1A;&#x5982;&#x679C;&#x540C;&#x65F6;&#x4F7F;&#x7528;transform&#x7684;&#x5176;&#x4ED6;&#x5C5E;&#x6027;&#x4F1A;&#x4EA7;&#x751F;&#x76F8;&#x4E92;&#x5F71;&#x54CD;&#x3002;&#x6240;&#x4EE5;&#x5728;&#x4E0D;&#x4F7F;&#x7528;transform&#x7684;&#x5176;&#x4ED6;&#x5C5E;&#x6027;&#x65F6;&#x63A8;&#x8350;&#x4F7F;&#x7528;&#x8BE5;&#x65B9;&#x5F0F;&#x3002;</li>
</ol>
</li>
</ul>
<h3 id="2&#xFF1A;flex&#x5E03;&#x5C40;">2&#xFF1A;flex&#x5E03;&#x5C40;</h3>
<pre><code class="lang-css"><span class="hljs-rule"><span class="hljs-attribute">display</span>:<span class="hljs-value"> flex</span></span>;
<span class="hljs-rule"><span class="hljs-attribute">align-items</span>:<span class="hljs-value"> center</span></span>;
</code></pre>
<ul>
<li>&#x539F;&#x7406;&#xFF1A;&#x5C06;&#x7236;&#x7EA7;&#x5143;&#x7D20;&#x8BBE;&#x7F6E;&#x4E3A;&#x6D41;&#x5F0F;&#x5E03;&#x5C40;&#xFF0C;&#x6839;&#x636E;flex&#x5E03;&#x5C40;&#x7684;&#x5C5E;&#x6027;&#x7279;&#x6027;&#xFF0C;&#x8BBE;&#x7F6E;&#x5B50;&#x5143;&#x7D20;&#x5C45;&#x4E2D;&#x3002;</li>
<li>&#x4F18;&#x7F3A;&#x70B9;<ol>
<li>&#x4F18;&#x70B9;&#xFF1A;flex&#x5E03;&#x5C40;&#x7075;&#x6D3B;&#xFF0C;&#x4E0D;&#x9700;&#x8981;&#x5BF9;&#x5B50;&#x5143;&#x7D20;&#x8FDB;&#x884C;&#x4EFB;&#x4F55;&#x7684;&#x8BBE;&#x7F6E;</li>
<li>&#x7F3A;&#x70B9;&#xFF1A;&#x5177;&#x6709;&#x517C;&#x5BB9;&#x6027;&#x3002;&#x5B50;&#x5143;&#x7D20;&#x7684;float&#x3001;clear&#x3001;position&#x7B49;&#x65E0;&#x6CD5;&#x4F7F;&#x7528;&#xFF0C;&#x5982;&#x679C;&#x540C;&#x65F6;&#x5177;&#x6709;&#x5176;&#x4ED6;&#x5E03;&#x5C40;&#xFF0C;&#x5BB9;&#x6613;&#x4EA7;&#x751F;&#x5F71;&#x54CD;&#x3002;</li>
</ol>
</li>
</ul>
<h3 id="3-&#x884C;&#x5185;&#x5143;&#x7D20;&#x548C;&#x884C;&#x5185;&#x5757;&#x5143;&#x7D20;&#xFF0C;&#x5355;&#x884C;&#x6587;&#x672C;-&#x5219;&#x53EF;&#x8BBE;&#x7F6E;-lineheight-&#x7B49;&#x4E8E;&#x7236;&#x5143;&#x7D20;&#x9AD8;&#x5EA6;&#x3002;">3. &#x884C;&#x5185;&#x5143;&#x7D20;&#x548C;&#x884C;&#x5185;&#x5757;&#x5143;&#x7D20;&#xFF0C;&#x5355;&#x884C;&#x6587;&#x672C;, &#x5219;&#x53EF;&#x8BBE;&#x7F6E; <code>line-height</code> &#x7B49;&#x4E8E;&#x7236;&#x5143;&#x7D20;&#x9AD8;&#x5EA6;&#x3002;</h3>
<h3 id="4-&#x884C;&#x5185;&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x8BBE;&#x7F6E;&#x5782;&#x76F4;&#x5C45;&#x4E2D;&#x3002;">4. &#x884C;&#x5185;&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x8BBE;&#x7F6E;&#x5782;&#x76F4;&#x5C45;&#x4E2D;&#x3002;</h3>
<ul>
<li>&#x5C45;&#x4E2D;&#x9700;&#x8981;&#x8BD5;&#x7528;&#x5230; display: inline-block, vertical-align: middle&#x548C;&#x4E00;&#x4E2A;&#x4F2A;&#x5143;&#x7D20;&#x8BA9;&#x5185;&#x5BB9;&#x5757;&#x5904;&#x4E8E;&#x5BB9;&#x5668;&#x4E2D;&#x592E;&#x3002;</li>
</ul>
<h3 id="5-&#x7236;&#x5143;&#x7D20;displaytable&#xFF0C;&#x5B50;&#x5143;&#x7D20;displaytablecell&#xFF0C;verticalalignmiddle">5. &#x7236;&#x5143;&#x7D20;<code>display:table</code>&#xFF0C;&#x5B50;&#x5143;&#x7D20;<code>display:table-cell</code>&#xFF0C;<code>vertical-align:middle</code></h3>
<h1 id="&#x5782;&#x76F4;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;verticalalign&#x5C5E;&#x6027;">&#x5782;&#x76F4;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;<code>vertical-align</code>&#x5C5E;&#x6027;</h1>
<ul>
<li>baseline&#x9ED8;&#x8BA4;&#x503C;&#xFF08;&#x5143;&#x7D20;&#x653E;&#x5728;&#x7236;&#x5143;&#x7D20;&#x7684;&#x57FA;&#x7EBF;&#x4E0A;&#xFF09;</li>
<li>top&#xFF08;&#x628A;&#x5143;&#x7D20;&#x653E;&#x5728;&#x7236;&#x5143;&#x7D20;&#x7684;&#x9876;&#x90E8;&#xFF09;</li>
<li>middle&#xFF08;&#x628A;&#x5143;&#x7D20;&#x653E;&#x5728;&#x7236;&#x5143;&#x7D20;&#x7684;&#x4E2D;&#x90E8;&#xFF09;</li>
<li>bottom&#xFF08;&#x628A;&#x5143;&#x7D20;&#x653E;&#x5728;&#x7236;&#x5143;&#x7D20;&#x7684;&#x5E95;&#x90E8;&#xFF09;<h4 id="&#x7ECF;&#x5E38;&#x7528;&#x4E8E;&#x8BBE;&#x7F6E;&#x56FE;&#x7247;&#x548C;&#x6587;&#x5B57;&#x5782;&#x76F4;&#x5BF9;&#x9F50;&#xFF1B;&#x7528;&#x4E8E;&#x8BBE;&#x7F6E;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x7684;&#x5782;&#x76F4;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;&#xFF0C;&#x4F46;&#x662F;&#x5B83;&#x53EA;&#x9488;&#x5BF9;&#x4E8E;&#x884C;&#x5185;&#x5143;&#x7D20;&#x6216;&#x8005;&#x884C;&#x5185;&#x5757;&#x5143;&#x7D20;&#x6709;&#x6548;&#xFF0C;&#x4E00;&#x822C;&#x642D;&#x914D;&#x884C;&#x5185;&#x5757;&#x7EA7;&#x5143;&#x7D20;">&#x7ECF;&#x5E38;&#x7528;&#x4E8E;&#x8BBE;&#x7F6E;&#x56FE;&#x7247;&#x548C;&#x6587;&#x5B57;&#x5782;&#x76F4;&#x5BF9;&#x9F50;&#xFF1B;&#x7528;&#x4E8E;&#x8BBE;&#x7F6E;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x7684;&#x5782;&#x76F4;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;&#xFF0C;&#x4F46;&#x662F;&#x5B83;&#x53EA;&#x9488;&#x5BF9;&#x4E8E;&#x884C;&#x5185;&#x5143;&#x7D20;&#x6216;&#x8005;&#x884C;&#x5185;&#x5757;&#x5143;&#x7D20;&#x6709;&#x6548;&#xFF0C;&#x4E00;&#x822C;&#x642D;&#x914D;&#x884C;&#x5185;&#x5757;&#x7EA7;&#x5143;&#x7D20;</h4>
<h3 id="verticalalign&#x5931;&#x53BB;&#x6548;&#x679C;&#xFF1A;">Vertical-align&#x5931;&#x53BB;&#x6548;&#x679C;&#xFF1A;</h3>
</li>
<li>1.&#x5143;&#x7D20;&#x8BBE;&#x7F6E;&#x6D6E;&#x52A8;</li>
<li>2&#x8EAB;&#x8FB9;&#x6CA1;&#x6709;&#x5176;&#x4ED6;&#x53C2;&#x8003;&#x5143;&#x7D20;</li>
<li>3 display&#x5C5E;&#x6027;&#x4E0D;&#x662F;inline-block</li>
<li>4 &#x6D4F;&#x89C8;&#x5668;&#x4E0D;&#x652F;&#x6301;display&#xFF1A;inline-block</li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../md/02css/01selector.html" class="navigation navigation-prev " aria-label="Previous page: 选择器"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../md/02css/Interview.html" class="navigation navigation-next " aria-label="Next page: 面试题"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"image-captions":{"attributes":{"style":"left: 50%;position: relative;transform: translateX(-50%);"},"caption":"图 _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_","align":"center","variable_name":"_pictures"},"fontsettings":{"theme":"night","family":"sans","size":2},"toggle-chapters":{},"highlight":{}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
    </body>
    <!-- End of book 我的电子书 -->
</html>
